var POP_BACK_DIV_ID='popBack';
var hiddenPopDiv=function(id){
	if(id){
		//$(id).setStyles({'display':'none'});
		document.getElementById(id).style.display='none';
	}else{
		$$('.pop').each(function(e,i){
			e.setStyles({'display':'none'});
		});
	}
	var b=$(POP_BACK_DIV_ID);
	if(b){
		b.dispose();
	}
}

var showPopDiv=function(id){
	var h=window.getScrollHeight();
	var w=window.getScrollWidth();
	var b=$(POP_BACK_DIV_ID);
	if(b){
		hiddenPopDiv();
	}
	b=new Element('div',{'id':POP_BACK_DIV_ID});
	b.setStyles({'position':'absolute','top':0,'left':0,'height':h+'px','width':w+'px',background:'url(images/popDiv.png) repeat','z-index':100});
	b.addEvent('click',function(){hiddenPopDiv();});
	b.set('html','&nbsp;');
	$$('body')[0].adopt(b);

	var a=document.getElementById(id);
	var h2=(window.getHeight()-a.style.height.toInt())/2+window.getScrollTop();
	var w2=(window.getWidth()-a.style.width.toInt())/2+window.getScrollLeft();
	a.style.position='absolute';
	a.style.top=h2+'px';
	a.style.left=w2+'px';
	a.style.display='block';
	a.style.zIndex=101;
	//$(id).setStyles({'position':'absolute','top':h2+'px','left':w2+'px','display':'block','z-index':101});
}